<?php $cFile = Files::getFirst($text_module->getId(), $text_module->getUserId()); ?>

<?php if( empty($cFile) ): ?>
    <?php echo image_tag('photo.png') ?>
<?php else: ?>
    <?php echo image_tag(
                    Files::getDirPath('tiny') . $cFile->getUname()
                ) ?>
<?php endif; ?>